package com.springcloud.market.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.springcloud.market.common.feign.OrderFeignService;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("`order`")   // 如果表名就叫 order，加反引号防关键字冲突
public class Order {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    private Long userId;
    private Long skuId;
    private Integer num;
    private Integer orderId;
    private Integer productId;

    public Order(Integer orderId, Integer productId) {
        this.orderId = orderId;
        this.productId = productId;
    }
}